<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<!doctype html>
<html>

<head>
	<meta charset="UTF-8">
	<title>支付失败</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <%-- <link href="${pageContext.request.contextPath}/static/bootstrap/bootstrap.css" rel="stylesheet" type="text/css"/> --%>
   <style>
		.logo {
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: 57px;
		}
		
		.name {
			width: 100%;
			align:center;
			font-size:14px;
		}
		.header {
			width: 100%;
			height: 50px;
			border-bottom: 2px solid #e60012;
			line-height: 50px;
			text-align: center;
			background-color: #fff;
			position: fixed;
			top: 0;
			left: 0;
			
		}
	</style>
	<script type="text/javascript">
	
		//判断浏览器类型
		var ua = navigator.userAgent.toLowerCase();
		var isWeixin = ua.indexOf('micromessenger') != -1;
		var isAndroid = ua.indexOf('android') != -1;
		var isIos = (ua.indexOf('iphone') != -1) || (ua.indexOf('ipad') != -1);
		if (!isWeixin) {
		    document.head.innerHTML = '<title>抱歉，出错了</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0"><link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/0.4.1/weui.css">';
		    document.body.innerHTML = '<div class="weui_msg"><div class="weui_icon_area"><i class="weui_icon_info weui_icon_msg"></i></div><div class="weui_text_area"><h4 class="weui_msg_title">请在微信客户端打开链接</h4></div></div>';
		}
		
		//获取url参数 
		function GetQueryString(name) {
		   var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i");
		   var r = window.location.search.substr(1).match(reg);
		   if (r!=null) return (r[2]); return null;
		}
	
		<%-- $(function(){
			var code = GetQueryString("o_code");
			var clientData = {"orders_code":""+code+"","is_pay":"2"};
			$.ajax({
				url:"<%=basePath%>/Orders/setPayResult.do",
				type:"post",
				data:clientData,
				async:false,
				success:function(data){
					if(data.success){
						//alert("ok");
					}
				}
			});
			
		}); --%>
		
		function returnIndex(){
			location.href = "http://www.sdsxdw.com/weixin";
		}
		
	</script>
	
</head>

<body>
		<div class="header">
			<p>支付失败</p>
		</div>
		<div class="main">
			<div class="logo">
				<img src="${ctxStatic }/weixin/images/failed.png" />
			</div>
		    <div class="name">
		    	<p>${remark }</p>
		    	<p><a onclick="javascript:returnIndex();">返回首页</a></p>
		    </div>
		</div>
	</body>
</html>